<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
	<head>
		<% content_for :title, t(:homepage_title) %>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="description" content="SLiMS (Senayan Library Management System) is an open source Library Management System. It is build on Open source technology like PHP and MySQL">
		<meta name="keywords" content="senayan,slims,library automation,free library application, library, perpustakaan, aplikasi perpustakaan">
		<meta name="viewport" content="width=device-width,initial-scale=1">
		<meta name="robots" content="index, nofollow">
		<%= stylesheet_link_tag	"style", :media => "all" %>
		<!-- load style -->
		<!--<link rel="shortcut icon" href="webicon.ico" type="image/x-icon" />
		<link href="template/core.style.css" rel="stylesheet" type="text/css" />
		<link href="template/default/style.css" rel="stylesheet" type="text/css" />
		<!--[if IE]>
		<link type="text/css" rel="stylesheet" media="all" href="template/default/ie.css"/>
		<![endif]-->
		<!--[if IE 6]>
		<link type="text/css" rel="stylesheet" media="all" href="template/default/ie6.css"/>
		<![endif]
		<script type="text/javascript" src="js/jquery.js"></script>
		<script type="text/javascript" src="js/form.js"></script>
		<script type="text/javascript" src="js/gui.js"></script>-->

		<script type="text/javascript" src="js/jquery-1.2.6.min.js"></script>
		<script type="text/javascript" src="js/jquery-easing-1.3.pack.js"></script>
		<script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"></script>
		<script type="text/javascript" src="js/coda-slider.1.1.1.pack.js"></script>
		<script type="text/javascript">
			var theInt = null;
			var $crosslink, $navthumb;
			var curclicked = 0;

			theInterval = function(cur) {
				clearInterval(theInt);

				if ( typeof cur != 'undefined')
					curclicked = cur;

				$crosslink.removeClass("active-thumb");
				$navthumb.eq(curclicked).parent().addClass("active-thumb");
				$(".stripNav ul li a").eq(curclicked).trigger('click');

				theInt = setInterval(function() {
					$crosslink.removeClass("active-thumb");
					$navthumb.eq(curclicked).parent().addClass("active-thumb");
					$(".stripNav ul li a").eq(curclicked).trigger('click');
					curclicked++;
					if (6 == curclicked)
						curclicked = 0;

				}, 3000);
			};

			$(function() {

				$("#main-photo-slider").codaSlider();

				$navthumb = $(".nav-thumb");
				$crosslink = $(".cross-link");

				$navthumb.click(function() {
					var $this = $(this);
					theInterval($this.parent().attr('href').slice(1) - 1);
					return false;
				});

				theInterval();
			});
		</script>

	</head>
	<body>
		<div class="prod_det_box">
			<div class="st_view_container" style="height: auto;">
				<div class="st_view" style="height: 1035px">
					<div id = "st_content_1" class="st_tab_view st_first_tab_view st_active_view" style="position: absolute; left: 0px; display: block; ">
						<div class="text">

							<% if @books.count > 0 %>
							<ul class="danhsach_truyen_list">
								<% @books.each do |book| %>
								<li>
									<%if session[:language] == "vi"%>
									<p class="img">
										<a class="preloader" title="sach" href="/books/<%= book.id%>?lang=vi"> <%= image_tag book.image.url(:small) %> </a>
										<span class="shadow_list"></span>
									</p>
									<p class="name_truyen">
										<a title="book test" href="/books/<%= book.id%>?lang=vi"> <b><%= book.title%></b> </a>
									</p>
									<p class="name_auhor">
										<a title="book test" href="/books/<%= book.id%>?lang=vi" target="_blank" >Rate: <%= book.rate %></a>
									</p>
									<%else%>
									<p class="img">
										<a class="preloader" title="sach" href="/books/<%= book.id%>"> <%= image_tag book.image.url(:small) %> </a>
										<span class="shadow_list"></span>
									</p>
									<p class="name_truyen">
										<a title="book test" href="/books/<%= book.id%>"> <b><%= book.title%></b> </a>
									</p>
									<p class="name_auhor">
										<a title="book test" href="/books/<%= book.id%>" target="_blank" >Rate: <%= book.rate %></a>
									</p>
									<%end%>
								</li>
								<% end %>
							</ul>

							<% else %>

							<p>
								<%= t :noResult%>
							</p>
							<% end %>
						</div>
					</div>
					</div>
				</div>
			</div>

	</body>
</html>
